<?php $foot_section = M("Blockquote")->find(2);?>
<?php $endurl =explode('_',$_SERVER['REQUEST_URI']);$rmparrs = explode('.', $endurl[1])?>
<?php $articles = M("article")->where('id='.$rmparrs[0])->find();?>
<?php $foot_section1 = M("category")->where('id='.$articles['catid'])->find();
?>
  
     <div class="new-ist-box item-info-box">
        <!-- 当前位置 -->
        <div class="wrap">
            <div class="crumb-location">
            <?php if($foot_section['parentid']!=0){
                $parent = M("category")->where('id='.$foot_section['parentid'])->find();?>
                 <span class="link">首页</span>
                  <span class="link">></span>
                 <a href="<?php echo ($parent['url']);?>"><?php echo $parent['catname']; ?></a> 
                  <span class="link">></span>
                  <span class="txt"><?php echo $foot_section['catname']; ?></span>
              <?php }else{ ?>  
               	<span class="link">首页</span>
               	 <span class="link">></span>
                    <span class="txt"><?php echo $foot_section['catname']; ?></span>
               <?php }?>      
            </div>
        </div>  


 <?php 
 if($foot_section1['parentid']!=0){
     $map['parentid']  = array('in',$foot_section1['parentid']);
}else{
    $map['parentid']  = array('in',$foot_section1['id']);
}

$categorys = M("category")->where($map)->select();
?>
<body>
   <div class="wrap item-box" style="margin-top: 40px;">
            <div class="item-nav">
                <h6 class="nav-title">
                <div style="width:212px;height:98px;background-image: url('{$themeDir}public/src/img/item_01.jpg');font:normal 18px/49px 'Microsoft YaHei';line-height:98px;text-align:center;font-size:34px;
    color: #333333;    
"><?php if($foot_section1['parentid']!=0){ echo $parent['catname'];}else{ echo $foot_section1['catname'];} ?></div>
<!--                     <img src="{$themeDir}public/src/img/item_01.jpg" width="212" height="98" /> -->
                </h6>
                <div style="height:20px;background: #f5f5f5;"></div>
                <div class="nav-list">
                <ul>
                <?php foreach ($categorys as $k=>$v){?>
    					
                        <li><a href="<?php echo uri($v);?>" ><?php echo $v['catname']; ?><i></i></i></a></li>
                        <?php } ?> 
                     
                    </ul>
                </div>
            </div>
        <!-- 当前位置 -->
        <!-- 单品详情 -->

            <div class="item-details">
                <div class="item-self-infos">
                    <div class="item-pic"><img  width='356px' height='356px' src="<?php echo $articles['thumb']?> "></div>
                    <div class="infos-des">
                        <h6 class="name"><?php echo $articles['title']?></h6>
                        <ul>
                           <li><?php echo $articles['jianjie']?></li>
                            
                    </div>
                </div>
                <div class="item-content">
                    <h6 class="title">产品详情</h6>
                    <div class="content">
                     
                        <p><?php echo $articles['content']?></p>
                    </div>
                </div>
                <div class="back-list"><a href="javascript:void(0);"><span>></span>返回列表</a></div>
            </div>
        </div>
         <!-- 单品详情 -->
       
      
    </div>

</body>
<<script>
	$(document).on('click','.back-list',function(){
		location.href=history.back();
		})
</script>
</html>